<!doctype html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport"
        content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
</head>
<body>
<div id="demo">
<!--  多一次嵌套 标明是静态化-->
  <h1>Vue<span>模板编译</span></h1>
  <p v-if="foo">{{foo}}</p>
  <comp foo="foo" :bar="foo"></comp>
</div>
<script src="../../dist/vue.js"></script>
<script>
  Vue.component('comp', {
    template: '<div>I am comp</div>'
  })
  // 创建实例
  const app = new Vue({
    el: '#demo',
    data: {foo:'foo'}
  });
  // 输出render函数
  console.log(app.$options.render);
</script>
</body>
</html>
